 function replaceHtml(el, html) {
      var oldEl = typeof el === "string" ? document.getElementById(el) : el;
      var newEl = oldEl.cloneNode(false);
      newEl.innerHTML = html;
      oldEl.parentNode.replaceChild(newEl, oldEl);
      return newEl;
 };